package service;

import jdbc.domain.Account;
import jdbc.persistence.AccountDao;
import jdbc.persistence.AccountDaoImpl;

public class AccountService {
    private AccountDao accountDao;

    public AccountService(){
        this.accountDao = new AccountDaoImpl();
    }

    public boolean addAccount(Account account){
        String username = account.getUsername();

        return true;
    }

    public Account getUser(String username, String password) {
        Account account = new Account();
        account.setUsername(username);
        account.setPassword(password);
        return accountDao.findUserByUsernameAndPassword(account);
    }
}
